package com.repository;

import com.entity.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CollectionRepository extends JpaRepository<Collection,Integer> {

    List<Collection> findAllByUserId(Integer userId);

    Page<Collection> findAllByUserId(Integer userId, Pageable pageable);

    int countByUserId(Integer userId);
}
